﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace GraphAlgorithms {
	public class GraphRepresentation {

		public GraphRepresentation() { }

		public GraphRepresentation(string fileName) {
			_adjList =  new AdjacencyList(fileName);
			_adjMatrix = new AdjacencyMatrix(fileName);
			_adjList.V = _adjMatrix.V;
			_adjList.E = _adjMatrix.E;
            _v = _adjMatrix.V;
            _e = _adjMatrix.E;
            foreach (Edge e in _e) {
                e.U.Edges.Add(e);
                e.V.Edges.Add(e);
            }
		}

		AdjacencyList _adjList;
		public AdjacencyList AdjList {
			get { return _adjList; }
			set { _adjList = value; }
		}

		AdjacencyMatrix _adjMatrix;
		public AdjacencyMatrix AdjMatrix {
			get { return _adjMatrix; }
			set { _adjMatrix = value; }
		}

		private List<Vertex> _v;
		public List<Vertex> V {
			get { return _v; }
			set { _v = value; }
		}

		private List<Edge> _e;
		public List<Edge> E {
			get { return _e; }
			set { _e = value; }
		}

		Dictionary<string, Vertex> _vDict;
		public Dictionary<string, Vertex> VDict {
			get { return _vDict; }
			set { _vDict = value; }
		}
	}
}
